package com.ws.service.serviceImpl;

import java.util.List;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ws.bean.Vehicle;
import com.ws.bean.VehicoleBrand;
import com.ws.dao.VehicleDao;
import com.ws.service.VehicleService;
import com.ws.util.Page;
@Service
public class VehicleServiceImp implements VehicleService {
	@Autowired
	VehicleDao dao;
	
	//获取所有的车辆信息
	@Override
	public List<Vehicle> getAllVehicles(Vehicle vehicle , Page page) {
		return dao.getAllVehicles( vehicle , page);
	}
	//增加一个车辆信息
	@Override
	public int addVehicle(Vehicle vehicle) {
		int result = dao.addVehicle(vehicle);
		return result;
	}
	//删除车辆信息
	@Override
	public int delVehicle(Integer vehicleid) {
		int result = dao.delVehicle(vehicleid);
		return result;
	}
	//修改车辆信息
	@Override
	public int editVehicle(Vehicle vehicle) {
		int result = dao.editVehicle(vehicle);
		return 0;
	}
	@Override
	public int getCount(Vehicle vehicle) {
		return dao.getCount(vehicle);
	}
	@Override
	public List<VehicoleBrand> getAllBrands() {
		return dao.getAllBrands();
	}

			
}
